<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="/common/commonCss.jsp"/>
<jsp:include page="/common/commonJs.jsp"/>
<script type="text/javascript">

if (window != top)
	top.location.href = location.href;

var result = true;
$(document).ready(function() {
	
	var loginStatus = '${loginStatus}';
	
	if(loginStatus.length>0){
		alertError("用户名或密码错误!");
	}
	
	$("#body").keydown(function(){
		var event = arguments.callee.caller.arguments[0];
		if(event && event.keyCode==13){ // enter 键
			if (valiForm()) {
				$("#form1").submit();
			}
		}
	});
	$("#login").bind("click", function() {
		if (valiForm()) {
			$("#form1").submit();
		}
	});
});


function valiForm(){
	var name = $("#username").val();
	var pass = $("#password").val();
	if (name == "") {
		alertError("用户名不能为空!");
		return false;
	}
	if (pass == "") {
		alertError("密码不能为空!");
		return false;
	}
	return true;
}
</script>
<title>嘉童游乐中心</title>
</head>

<body class="l_bg" id="body">
<div class="head_log pt50 fixed">
	<div class="logo fl"><img src="${basePath }commonCss/images/logo.png" /></div>
</div>

<div class="login_banner">
 <form id="form1" action="${basePath }login.shtml" method="post">
	<div class="login_content">
    	<div>
        	<input type="text" id="username" name="username" class="login_input" placeholder="账号" value="${rmbName }"/><br/>
        </div>
    	<div>
        	<input type="password" id="password" name="password" class="login_input" placeholder="密码" value="${rmbPwd }"/><br/>
        </div>
        <div>
        	<input type="button" class="login_but" id="login" />
        </div>
    </div>
    </form>
</div>

</body>
</html>
